projects
/
xen.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6492f2f
)
Make date time handling slightly more permissive
author
Tom Wilkie
<tom.wilkie@gmail.com>
Tue, 10 Apr 2007 16:01:40 +0000
(17:01 +0100)
committer
Tom Wilkie
<tom.wilkie@gmail.com>
Tue, 10 Apr 2007 16:01:40 +0000
(17:01 +0100)
signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
tools/python/xen/xm/main.py
patch
|
blob
|
history
diff --git
a/tools/python/xen/xm/main.py
b/tools/python/xen/xm/main.py
index 3dca2ee243cf011303c996ab08828c67d476da59..337d2a6a7517bcbafa80f7578321be5b2215b36d 100644
(file)
--- a/
tools/python/xen/xm/main.py
+++ b/
tools/python/xen/xm/main.py
@@
-732,8
+732,10
@@
def xm_restore(args):
def datetime_to_secs(v):
- return time.mktime(time.strptime(str(v) + 'UTC', '%Y%m%dT%H:%M:%S%Z'))
-
+ unwanted = ":-."
+ for c in unwanted:
+ v = str(v).replace(c, "")
+ return time.mktime(time.strptime(v[0:14], '%Y%m%dT%H%M%S'))
def getDomains(domain_names, state, full = 0):
if serverType == SERVER_XEN_API: